#ifndef EXAMWINDOW_HPP
#define EXAMWINDOW_HPP

#include <QWidget>
#include <BlankForm.hpp>
#include <ChoiceForm.hpp>
#include <JudgementForm.hpp>

#include <Question.hpp>

namespace Ui {
class ExamWindow;
}

class QTimer;
class QTabWidget;

struct ExamConfig{
    QFont mainfont;
    QFont itemfont;
    RandomQuestion rdq;
};

struct Switch{
    QWidget *widget;
    ExamInterface *exam;
};

class ExamWindow : public QWidget
{
    Q_OBJECT

public:
    explicit ExamWindow(QWidget *parent = 0);
    ~ExamWindow();
public slots:
    void button_click();
    void timer_shot();
private:
    void button_clicked(QAbstractButton *btn);
    void nextCheck_click();
    void resetTimer();
    Ui::ExamWindow *ui;
    QTabWidget *tabWidget;
    ChoiceForm *choice;
    JudgementForm *judgement;
    BlankForm *shortAnswer,*blank,*challenge;
    QTimer *timer;
    int seconds;
    ExamConfig config;
    bool buttonRole;
};

#endif // EXAMWINDOW_HPP
